#!/bin/bash
# resner@e.email, resner@notabug.org

if [[ -z "$1" || -z "$2"  ]]
then
	echo "Arguments not specified."
	exit 1
fi

for i in *."$1";
  do name="$(echo "$i" | cut -d'.' -f1)"
  echo "$name.$1 -> $name.$2"
  ffmpeg -i "$i" "${name}.$2"
done